package 预科0103Poker;
//扑克牌类
public class PokerCard {
	//花色
	private String color;
	//牌面
	private String num;
	//大小
	private int value;
	public int getValue() {
		return value;
	}
	public String getColor() {
		return color;
	}
	public void setColor(int color) {
		switch(color) {
		case 0:this.color ="黑桃";break;
		case 1:this.color ="红桃";break;
		case 2:this.color ="方块";break;
		case 3:this.color ="梅花";break;
		case 4:this.color ="";break;
		}
		 
	}
	public String getNum() {
		return num;
	}
	public void setNum(int num) {
		switch(num) {
		case 1:this.num ="3";this.value =1;break;
		case 2:this.num ="4";this.value =2;break;
		case 3:this.num ="5";this.value =3;break;
		case 4:this.num ="6";this.value =4;break;
		case 5:this.num ="7";this.value =5;break;
		case 6:this.num ="8";this.value =6;break;
		case 7:this.num ="9";this.value =7;break;
		case 8:this.num ="10";this.value =8;break;
		case 9:this.num ="J";this.value =9;break;
		case 10:this.num ="Q";this.value =10;break;
		case 11:this.num ="K";this.value =11;break;
		case 12:this.num ="A";this.value =12;break;
		case 13:this.num ="2";this.value =13;break;
		case 14:this.num ="小王";this.value =14;break;
		case 15:this.num ="大王";this.value =15;}
	}
	public PokerCard(int color, int num) {
		super();
		setColor(color);
		setNum(num);
	}
	@Override
	public String toString() {
		return "PokerCard [color=" + color + ", num=" + num + "]";
	}
	
}
